package cn.scw.project.goods.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import cn.scw.project.goods.domain.netework.bean.GCommodityModelAddReq;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
 * 商品规格对象 g_commodity_model
 *
 * @author api
 * @date 2020-05-20
 */
public class GCommodityModel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 商品id */
    @Excel(name = "商品id")
    private Long commodityId;

    /** 规格 */
    @Excel(name = "规格")
    private String name;

    /** 价格 */
    @Excel(name = "价格")
    private Double price;

    public GCommodityModel(GCommodityModelAddReq req) {
        this.name=req.getName();
        this.price=req.getPrice();
    }
    public GCommodityModel() {
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCommodityId(Long commodityId)
    {
        this.commodityId = commodityId;
    }

    public Long getCommodityId()
    {
        return commodityId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setPrice(Double price)
    {
        this.price = price;
    }

    public Double getPrice()
    {
        return price;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("commodityId", getCommodityId())
            .append("name", getName())
            .append("price", getPrice())
            .toString();
    }
}
